package xcmg.device.dao.mapper;

import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.marketing.MarketingDealerDO;
import org.apache.ibatis.annotations.Mapper;
import xcmg.device.dao.entity.marketing.MarketingDealerViewDO;
import xcmg.device.service.vo.marketing.MarketingDealerViewFilter;

import java.util.List;

@Mapper
public interface MarketingDealerMapper {
    int deleteByPrimaryKey(String id);

    int insert(MarketingDealerDO record);

    MarketingDealerDO item(String id);

    int update(MarketingDealerDO record);

    int updateByPrimaryKey(MarketingDealerDO record);

    int deleteByActivityId(String activityId);

    int deleteByIds(@Param("ids")List<String> ids);

    List<MarketingDealerViewDO> marketingDealerViewList(MarketingDealerViewFilter marketingDealerViewFilter);

    List<MarketingDealerDO> list(@Param("orgId")String orgId,@Param("activityId") String activityId);

    MarketingDealerDO itemByDealerOrgId(@Param("orgId")String orgId, @Param("activityId") String activityId, @Param("dealerOrgId")String dealerOrgId);

    MarketingDealerDO itemPriceGroup(@Param("orgId")String orgId, @Param("dealerOrgId")String dealerOrgId, @Param("priceGroup")String priceGroup);

    int deleteForUpdate(@Param("orgId")String orgId);

    int batchInsert(List<MarketingDealerDO> list);

    List<MarketingDealerDO> dealerDOList(@Param("orgId")String orgId,@Param("dealerOrgId")String dealerOrgId);
    // 校验是否存在
    Integer checkPresenceCount(@Param("activityId")String activityId,@Param("dealerOrgId")String dealerOrgId);

    int batchRemoveDealer(@Param("orgId")String orgId, @Param("activityId") String activityId);
}